import { DEFAULT_MENUS_MAP } from './constants'

export default {
  name: 'menu-btns',
  emits: Object.keys(DEFAULT_MENUS_MAP),
  props: {
    menus: {
      type: Array,
      required: true
    }
  },
  render () {
    // <i class={DEFAULT_MENUS_MAP[menu].icon || menu} />
    return (
      <div>
        {
          this.menus.map(menu => (
            <a-button
              class="btn--text"
              type='primary'
              onClick={() => this.$emit(menu)}
            >{DEFAULT_MENUS_MAP[menu].label}</a-button>
          ))
        }
      </div>
    )
  }
}
